package com.panghl.service;

import com.panghl.entity.OrderInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panghl.enums.OrderStatus;

import java.security.GeneralSecurityException;
import java.util.List;
import java.util.Map;

public interface OrderInfoService extends IService<OrderInfo> {
    OrderInfo createOrderByProductId(Long productId,String payType);

    void saveCodeUrl(String orderNo,String codeUrl);

    List<OrderInfo> listOrderByCreateTimeDesc();

    /**
     * 处理订单  先对报文解密
     * @param wxBodyMap
     */
    void processOrder(Map<String, Object> wxBodyMap) throws GeneralSecurityException;

    String getOrderStatus(String orderNo);

    void updateStatusByOrderNo(String orderNo, OrderStatus success);

    List<OrderInfo> getNoPayOrderByDuration(int minutes,String payType);

    OrderInfo getOrderByOrderNo(String orderNo);
}
